# -*-encoding: utf-8 -*-

from utils.terms.Term_Info import Term_Info
from utils.terms.Termid_List_Sparse import Termid_List_Sparse_lil, Termid_List_Sparse_dok
from utils.logger.LLogger import logger

import sys 
reload(sys) 
sys.setdefaultencoding('utf-8')

if __name__ == "__main__":
    #mTermInfo = "/root/.csmetrics/term_info.txt"
    #mTermidList = "/root/.csmetrics/termid_list.txt"
    mTermInfo = "/Users/lczgywzyy/.csmetrics/term_info.txt"
    mTermidList = "/Users/lczgywzyy/.csmetrics/termid_list.txt"
    mTermSize = Term_Info(mTermInfo).getTermSize()
    logger.info("mTermSize: %d" % (mTermSize))
    lil = Termid_List_Sparse_lil(mTermidList, mTermSize)
    dok = Termid_List_Sparse_dok(mTermidList, mTermSize)
    lil.calculateMatrix()
    dok.calculateMatrix()
